package com.yaj.myfactorysupport.controller;


import com.yaj.myfactorysupport.entity.TSmtRoll;
import com.yaj.myfactorysupport.service.TSmtRollService;
import com.yaj.myfactorysupport.util.RespBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wei
 * @since 2021-06-05
 */
@Api(tags = "TSmtRollController")
@RestController
@RequestMapping("/myfactorysupport/t-smt-roll")
public class TSmtRollController {
    @Autowired
    private TSmtRollService tSmtRollService;

    @ApiOperation(value = "登录Smt部品轴配当情报")
    @PostMapping(value = "RegSMTRoll")
    public RespBean RegSMTRoll(@RequestBody TSmtRoll tSmtRoll){
        return tSmtRollService.RegSMTRoll(tSmtRoll);
    }


    @ApiOperation(value = "取得当前已登录部品一览")
    @GetMapping(value = "GetRegisterParts")
    public RespBean GetRegisterParts(String OrderNo, BigDecimal BrNo, String MounterID, String SMTSide, String SmtProcess){
        return tSmtRollService.GetRegisterParts(OrderNo,BrNo,MounterID,SMTSide,SmtProcess);
    }

    @ApiOperation(value= "取得上料确认以及部品补充确认后的最新PartId集合")
    @GetMapping(value = "GetReplenishGoods")
    public RespBean GetReplenishGoods(String OrderNo, BigDecimal BrNo, String MounterID, String SMTSide){
        return tSmtRollService.GetReplenishGoods(OrderNo,BrNo,MounterID,SMTSide);
    }
}

